<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="stylesheet" href="mm_lodging1.css" type="text/css" />
    
    <title>Create Marker v1.0</title>

<style type="text/css">
	<!--
	body {
		background-color: #0099CC;
	}
	.style2 {font-family: Arial, Helvetica, sans-serif}
	.style3 {
		font-family: Verdana, Arial, Helvetica, sans-serif;
		color: #000000;
		font-weight: bold;
	}
	.style5 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; }
	-->
</style>

<script type="text/javascript" src="calendarDateInput.js"></script>

</head>

<body>
<h1 align="center" class="pageName style3">
    <span class="style2">Create Event</span>
    <img src="Imagenes/login2.png" width="32" height="28" />
</h1>



<form method="post" action="createEvent1.php">
<p align="left">

<table width="200" border="0">
  <tr>
    <td><table width="305" border="0">
      <tr>
        <td width="200" height="44"><div align="right" class="style5">
            <div align="left"> Name </div>
        </div></td>
        <td width="200"><span class="markerDetail style2">
          <input name="name" id="name" type="text" class="style5" size="30" maxlength="40"/>
        </span> </td>
      </tr>
      <tr>
        <td width="200" height="44"><div align="right" class="style5">
            <div align="left"> Kind of event </div>
        </div></td>
        <td width="200"><span class="markerDetail style2">
          <input name="KindOfEvent" id="KindOfEvent" type="text" class="style5" size="30" maxlength="40"/>
        </span> </td>
      </tr>
      <tr>
        <td width="200" height="44"><div align="right" class="style5">
            <div align="left"> Date </div>
        </div></td>
        <td width="200"><span class="markerDetail style2">
          <script>DateInput('orderdate', true, 'YYYY-MM-DD')</script>
        </span> </td>
      </tr>
      <tr>
        <td width="200" height="44"><div align="right" class="style5">
            <div align="left"> Time (H/m) </div>
        </div></td>
        <td width="200"><span class="markerDetail style2">
        	<SELECT NAME="hour">  
        		<?php for ($i=0; $i<24; $i++) {
					echo "<OPTION VALUE=\"";
					echo $i;
					echo "\">";
					echo $i;
				}?>
			</SELECT>
			<SELECT NAME="minute">  
        		<?php for ($i=0; $i<60; $i++) {
					echo "<OPTION VALUE=\"";
					echo $i;
					echo "\">";
					echo $i;
				}?>
			</SELECT>
        </span> </td>
      </tr>
      <tr>
        <td width="200" height="44"><div align="right" class="style5">
            <div align="left"> More info </div>
        </div></td>
        <td width="200"><span class="markerDetail style2">
          <textarea name="moreinfo" cols="27" wrap="physical" class="style5"></textarea>
        </span> </td>
      </tr>
      <tr>
        <td width="200" height="44"><div align="right" class="style5">
            <div align="left"> Link </div>
        </div></td>
        <td width="200"><span class="markerDetail style2">
          <input name="link" id="link" type="text" class="style5" size="30" maxlength="40"/>
        </span> </td>
      </tr>
      <tr>
        <td width="200" height="44"><div align="right" class="style5">
            <div align="left"> Place </div>
        </div></td>
        <td width="200"><span class="markerDetail style2">
        	<SELECT NAME="place">  
        		<?php 
        		
        		// Getting places
        		
        		include "Global.php";
        		
        		$connection = DBConnect();
        		
        		
        		$query = sprintf("SELECT * FROM places");
			
				$result = mysql_query($query) or die ('\n error en query ' . mysql_error());
			
				if (!$result) 
				{
				    $message  = 'Requête invalide : ' . mysql_error() . "\n";
				    $message .= 'Requête complète : ' . $query;
				    die($message);
				}
			
			
				while($row = mysql_fetch_assoc($result))
				{
					$db_PlaceID=$row['IDplaces'];
					$db_PlaceName=$row['Name'];
					
					echo "<OPTION VALUE=\"";
					echo $db_PlaceID;
					echo "\">";
					echo $db_PlaceName;
				}
				
				DBClose($connection)
				?>
			</SELECT>
        </span> </td>
      </tr>
    </table></td>
  </tr>
<table>

<p align="center">
      <input name="submit" type="submit" class="subHeader" value="Save Event"/>
</p>

</form>    



</body>
</html>
